.class Lcom/example/m6wmr/SlidFramentActicityd$5;
.super Ljava/lang/Thread;
.source "SlidFramentActicityd.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/example/m6wmr/SlidFramentActicityd;->saveshoptype()Z
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/example/m6wmr/SlidFramentActicityd;


# direct methods
.method constructor <init>(Lcom/example/m6wmr/SlidFramentActicityd;)V
    .locals 0

    .prologue
    .line 1
    iput-object p1, p0, Lcom/example/m6wmr/SlidFramentActicityd$5;->this$0:Lcom/example/m6wmr/SlidFramentActicityd;

    .line 412
    invoke-direct {p0}, Ljava/lang/Thread;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 15

    .prologue
    const-wide/16 v13, 0x5dc

    .line 414
    invoke-super {p0}, Ljava/lang/Thread;->run()V

    .line 417
    new-instance v4, Landroid/os/Message;

    invoke-direct {v4}, Landroid/os/Message;-><init>()V

    .line 419
    .local v4, "msg":Landroid/os/Message;
    new-instance v7, Ljava/lang/StringBuilder;

    iget-object v8, p0, Lcom/example/m6wmr/SlidFramentActicityd$5;->this$0:Lcom/example/m6wmr/SlidFramentActicityd;

    # getter for: Lcom/example/m6wmr/SlidFramentActicityd;->m:Lmyapp/MyApp;
    invoke-static {v8}, Lcom/example/m6wmr/SlidFramentActicityd;->access$11(Lcom/example/m6wmr/SlidFramentActicityd;)Lmyapp/MyApp;

    move-result-object v8

    invoke-virtual {v8}, Lmyapp/MyApp;->getWebConfig()Ljava/lang/String;

    move-result-object v8

    invoke-static {v8}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v8

    invoke-direct {v7, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 420
    const-string v8, "/index.php?ctrl=app&action=getshoptype&datatype=json"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    .line 419
    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    .line 422
    .local v6, "url":Ljava/lang/String;
    const-string v7, "Aniactivity"

    new-instance v8, Ljava/lang/StringBuilder;

    const-string v9, "saveshoptype() \u5e97\u94fa\u7c7b\u578b"

    invoke-direct {v8, v9}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v8, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v8

    invoke-static {v7, v8}, Lmyapp/Mylog;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 423
    iget-object v7, p0, Lcom/example/m6wmr/SlidFramentActicityd$5;->this$0:Lcom/example/m6wmr/SlidFramentActicityd;

    # getter for: Lcom/example/m6wmr/SlidFramentActicityd;->m:Lmyapp/MyApp;
    invoke-static {v7}, Lcom/example/m6wmr/SlidFramentActicityd;->access$11(Lcom/example/m6wmr/SlidFramentActicityd;)Lmyapp/MyApp;

    move-result-object v7

    invoke-static {v6, v7}, LPlugclass/HttpConn;->getStr(Ljava/lang/String;Lmyapp/MyApp;)Ljava/lang/String;

    move-result-object v5

    .line 425
    .local v5, "str":Ljava/lang/String;
    :try_start_0
    new-instance v3, Lorg/json/JSONObject;

    invoke-direct {v3, v5}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    .line 426
    .local v3, "json":Lorg/json/JSONObject;
    const-string v7, "error"

    invoke-virtual {v3, v7}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v7

    const-string v8, "true"

    invoke-virtual {v7, v8}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v7

    if-eqz v7, :cond_0

    .line 427
    const/4 v7, 0x3

    iput v7, v4, Landroid/os/Message;->arg1:I
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 452
    :goto_0
    iget-object v7, p0, Lcom/example/m6wmr/SlidFramentActicityd$5;->this$0:Lcom/example/m6wmr/SlidFramentActicityd;

    iget-object v7, v7, Lcom/example/m6wmr/SlidFramentActicityd;->h:Landroid/os/Handler;

    invoke-virtual {v7, v4, v13, v14}, Landroid/os/Handler;->sendMessageDelayed(Landroid/os/Message;J)Z

    .line 454
    .end local v3    # "json":Lorg/json/JSONObject;
    :goto_1
    return-void

    .line 429
    .restart local v3    # "json":Lorg/json/JSONObject;
    :cond_0
    :try_start_1
    const-string v7, "msg"

    invoke-virtual {v3, v7}, Lorg/json/JSONObject;->isNull(Ljava/lang/String;)Z

    move-result v7

    if-eqz v7, :cond_1

    .line 430
    const/4 v7, 0x3

    iput v7, v4, Landroid/os/Message;->arg1:I
    :try_end_1
    .catch Lorg/json/JSONException; {:try_start_1 .. :try_end_1} :catch_0
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    goto :goto_0

    .line 447
    .end local v3    # "json":Lorg/json/JSONObject;
    :catch_0
    move-exception v0

    .line 449
    .local v0, "e":Lorg/json/JSONException;
    :try_start_2
    invoke-virtual {v0}, Lorg/json/JSONException;->printStackTrace()V

    .line 450
    const/4 v7, 0x3

    iput v7, v4, Landroid/os/Message;->arg1:I
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    .line 452
    iget-object v7, p0, Lcom/example/m6wmr/SlidFramentActicityd$5;->this$0:Lcom/example/m6wmr/SlidFramentActicityd;

    iget-object v7, v7, Lcom/example/m6wmr/SlidFramentActicityd;->h:Landroid/os/Handler;

    invoke-virtual {v7, v4, v13, v14}, Landroid/os/Handler;->sendMessageDelayed(Landroid/os/Message;J)Z

    goto :goto_1

    .line 432
    .end local v0    # "e":Lorg/json/JSONException;
    .restart local v3    # "json":Lorg/json/JSONObject;
    :cond_1
    :try_start_3
    const-string v7, "msg"

    invoke-virtual {v3, v7}, Lorg/json/JSONObject;->getJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v2

    .line 433
    .local v2, "jarray":Lorg/json/JSONArray;
    iget-object v7, p0, Lcom/example/m6wmr/SlidFramentActicityd$5;->this$0:Lcom/example/m6wmr/SlidFramentActicityd;

    # getter for: Lcom/example/m6wmr/SlidFramentActicityd;->db:Landroid/database/sqlite/SQLiteDatabase;
    invoke-static {v7}, Lcom/example/m6wmr/SlidFramentActicityd;->access$12(Lcom/example/m6wmr/SlidFramentActicityd;)Landroid/database/sqlite/SQLiteDatabase;

    move-result-object v7

    const-string v8, "shoptype"

    const-string v9, "cattype =0 "

    const/4 v10, 0x0

    invoke-virtual {v7, v8, v9, v10}, Landroid/database/sqlite/SQLiteDatabase;->delete(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;)I

    .line 434
    const/4 v1, 0x0

    .local v1, "i":I
    :goto_2
    invoke-virtual {v2}, Lorg/json/JSONArray;->length()I

    move-result v7

    if-lt v1, v7, :cond_2

    .line 443
    const/4 v7, 0x4

    iput v7, v4, Landroid/os/Message;->arg1:I
    :try_end_3
    .catch Lorg/json/JSONException; {:try_start_3 .. :try_end_3} :catch_0
    .catchall {:try_start_3 .. :try_end_3} :catchall_0

    goto :goto_0

    .line 451
    .end local v1    # "i":I
    .end local v2    # "jarray":Lorg/json/JSONArray;
    .end local v3    # "json":Lorg/json/JSONObject;
    :catchall_0
    move-exception v7

    .line 452
    iget-object v8, p0, Lcom/example/m6wmr/SlidFramentActicityd$5;->this$0:Lcom/example/m6wmr/SlidFramentActicityd;

    iget-object v8, v8, Lcom/example/m6wmr/SlidFramentActicityd;->h:Landroid/os/Handler;

    invoke-virtual {v8, v4, v13, v14}, Landroid/os/Handler;->sendMessageDelayed(Landroid/os/Message;J)Z

    .line 453
    throw v7

    .line 435
    .restart local v1    # "i":I
    .restart local v2    # "jarray":Lorg/json/JSONArray;
    .restart local v3    # "json":Lorg/json/JSONObject;
    :cond_2
    :try_start_4
    iget-object v7, p0, Lcom/example/m6wmr/SlidFramentActicityd$5;->this$0:Lcom/example/m6wmr/SlidFramentActicityd;

    # getter for: Lcom/example/m6wmr/SlidFramentActicityd;->db:Landroid/database/sqlite/SQLiteDatabase;
    invoke-static {v7}, Lcom/example/m6wmr/SlidFramentActicityd;->access$12(Lcom/example/m6wmr/SlidFramentActicityd;)Landroid/database/sqlite/SQLiteDatabase;

    move-result-object v7

    .line 436
    const-string v8, "insert into shoptype (id,name,cattype) values(?,?,?)"

    .line 437
    const/4 v9, 0x3

    new-array v9, v9, [Ljava/lang/Object;

    const/4 v10, 0x0

    .line 438
    invoke-virtual {v2, v1}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v11

    .line 439
    const-string v12, "id"

    invoke-virtual {v11, v12}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v11

    aput-object v11, v9, v10

    const/4 v10, 0x1

    .line 440
    invoke-virtual {v2, v1}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v11

    .line 441
    const-string v12, "name"

    invoke-virtual {v11, v12}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v11

    aput-object v11, v9, v10

    const/4 v10, 0x2

    const/4 v11, 0x0

    invoke-static {v11}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v11

    aput-object v11, v9, v10

    .line 435
    invoke-virtual {v7, v8, v9}, Landroid/database/sqlite/SQLiteDatabase;->execSQL(Ljava/lang/String;[Ljava/lang/Object;)V
    :try_end_4
    .catch Lorg/json/JSONException; {:try_start_4 .. :try_end_4} :catch_0
    .catchall {:try_start_4 .. :try_end_4} :catchall_0

    .line 434
    add-int/lit8 v1, v1, 0x1

    goto :goto_2
.end method

.method public declared-synchronized start()V
    .locals 1

    .prologue
    .line 457
    monitor-enter p0

    :try_start_0
    invoke-super {p0}, Ljava/lang/Thread;->start()V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 458
    monitor-exit p0

    return-void

    .line 457
    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method
